package cn.com.headfree.depterprela.dao.impl;

import cn.com.headfree.depterprela.dao.IDeptErpRelaDao;
import cn.com.headfree.depterprela.dao.OrgDeptDao;
import cn.com.headfree.entity.*;
import com.gta.edu.sdk.base.dao.impl.BaseDaoImpl;
import com.gta.edu.sdk.common.dto.Page;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Repository;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository("orgDeptDao")
public class OrgDeptDaoImpl extends BaseDaoImpl<TOrgDept> implements OrgDeptDao {


	@Override
	public TOrgDept getOrgDeptById(String id) {
		String sql = "select t.* from t_org_dept t where t.id = ? ";
		return this.findUnique(TOrgDept.class, sql, new Object[] {id});
	}

	@Override
	public List<TOrgDept> findAll() {
		String sql = "select t.* from t_org_dept t";
		return this.findAllBySQL(TOrgDept.class, sql, null, false,new Object[]{});
	}

}
